<script>
// 数据详情页
import { defineComponent } from 'vue'
export default defineComponent({
	name: 'WeworkQrList'
})
</script>
<script setup>
import { qrDataDesc } from '../lib/constant'
import { qrListData, qrDataForm, qrDataListData } from '@/data'
import MyIcon from '@/components/my-icon/index.vue'
import { ref } from 'vue'
import {postDataQr} from '@/api'
const queryForm = ref({
	qrId: ''
})

const qrList = ref([])
qrList.value = qrListData
// 集合数据
const qrDataSet = ref([])
const getData=async()=>{
		const r = await postDataQr()
		if (r) {
			localStorage.setItem('widQr',r.data.wid)
			qrDataSet.value = r.data
		}
	}
	getData()
// 集合列表
const qrDataSetList = ref([])
qrDataSetList.value = qrDataListData

const multipleTableRef = ref()
const multipleSelection = ref([])
const selectAll = ref(false)
const total = ref(0)

const exportExcel = () => {
	console.log('导出excel')
}
const handleCurrentChange = (val) => {
	console.log(`current page: ${val}分页请求接口`)
	getqrList()
}
const handleSelectAll = () => {
	multipleTableRef.value.clearSelection()
	if (selectAll.value) {
		qrDataSetList.value.forEach((row) => {
			multipleTableRef.value.toggleRowSelection(row, undefined)
		})
	}
}

const handleSelectionChange = (val) => {
	multipleSelection.value = val
	if (multipleSelection.value.length == qrDataSetList.value.length) {
		selectAll.value = true
	} else {
		selectAll.value = false
	}
}
</script>

<template>
	<div class="app-edit app-gap-block-top">
		<div class="app-container">
			<div class="table-title">
				今日增长数据
				<span class="a-ml16 app-words-tip-weak"
					>统计说明
					<el-popover width="" popper-style="padding: 0px;min-width:0px" placement="top" trigger="hover">
						<div class="app-container margin-fa">
							<div class="margin-son" v-for="(item, index) in qrDataDesc" :key="index">{{ item }}</div>
						</div>
						<template #reference>
							<MyIcon class="question-icon weak" name="Question" />
						</template> </el-popover
				></span>
			</div>
			<div class="app-gap-block-top">
				<el-tag class="app-blue-card" style="height: auto;padding: 30px;">
					<div class="app-flex-left">
						<div class="app-card-item app-border-right">
							<div class="app-card-title">{{ qrDataSet.day_add_size }}</div>
							<div class="app-card-desc">今日添加客户数(人)</div>
						</div>
						<div class="app-card-item">
							<div class="app-card-item">
								<div class="app-card-title">{{ qrDataSet.day_del_size }}</div>
								<div class="app-card-desc">今日流失客户数(人)</div>
							</div>
						</div>
					</div>
				</el-tag>
				<el-tag class="app-edit-title-words app-blue-card"  style="height: auto;padding: 30px;">
					<div class="app-flex-left">
						<div class="app-card-item app-border-right">
							<div class="app-card-title">{{ qrDataSet.all_add_size }}</div>
							<div class="app-card-desc">总添加客户数(人)</div>
						</div>
						<div class="app-card-item">
							<div class="app-card-item">
								<div class="app-card-title">{{ qrDataSet.all_del_size }}</div>
								<div class="app-card-desc">总流失客户数(人)</div>
							</div>
						</div>
					</div>
				</el-tag>
			</div>
		</div>

		<div></div>
	</div>
</template>
<style lang="scss">
@import url('../../../../style/app-component.scss');
@import '../../../../style/mixin.scss';
</style>
